<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        table{
            border-collapse: collapse;
        }
    </style>
</head>
<body>
<form action="" method="post">
    {% csrf_token %}
    <table border="1">
    {% for i in data %}
        <tr>
            <td>书名</td>
            <td>
                <input type="text" name="name" value="{{ i.name }}">
            </td>
        </tr>
        <tr>
            <td>价格</td>
            <td>
                <input type="text" name="price" value="{{ i.price }}">
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <input type="submit" name="修改">
            </td>
        </tr>
    {% endfor %}
    </table>


</form>

</body>
</html>